package vn.edu.saigontech.ncms.web.program;

import vn.edu.saigontech.ncms.service.ProgramService;
import vn.edu.saigontech.ncms.web.BaseAction;

@SuppressWarnings("serial")
public class ProgramAction extends BaseAction {
	private Long programId1;
	private Long programId2;
	
	public String list() {
		REQUEST().setAttribute("programs", ProgramService.INSTANCE.findAll());
		return SUCCESS;
	}
	
	public String compare() {
		REQUEST().setAttribute("program1", ProgramService.INSTANCE.findById(programId1));
		REQUEST().setAttribute("program2", ProgramService.INSTANCE.findById(programId2));
		return SUCCESS;	
	}

	public Long getProgramId1() {
		return programId1;
	}

	public void setProgramId1(Long programId1) {
		this.programId1 = programId1;
	}

	public Long getProgramId2() {
		return programId2;
	}

	public void setProgramId2(Long programId2) {
		this.programId2 = programId2;
	}
}
